<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>hashcat-3.201: H:/TDDownload/Hashcat v3.20/hashcat-3.201/src/outfile.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">hashcat-3.201
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_06fe396e3e859736df6d43ad26baa72e.html">hashcat-3.201</a></li><li class="navelem"><a class="el" href="dir_9ce3dfc5d638c7f8b2c4ec0f6627771b.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">outfile.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;common.h&quot;</code><br />
<code>#include &quot;types.h&quot;</code><br />
<code>#include &quot;memory.h&quot;</code><br />
<code>#include &quot;event.h&quot;</code><br />
<code>#include &quot;convert.h&quot;</code><br />
<code>#include &quot;interface.h&quot;</code><br />
<code>#include &quot;hashes.h&quot;</code><br />
<code>#include &quot;mpsp.h&quot;</code><br />
<code>#include &quot;rp.h&quot;</code><br />
<code>#include &quot;rp_kernel_on_cpu.h&quot;</code><br />
<code>#include &quot;opencl.h&quot;</code><br />
<code>#include &quot;shared.h&quot;</code><br />
<code>#include &quot;outfile.h&quot;</code><br />
<code>#include &quot;locking.h&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for outfile.c:</div>
<div class="dyncontent">
<div class="center"><img src="outfile_8c__incl.gif" border="0" usemap="#_h_1_2_t_d_download_2_hashcat_01v3_820_2hashcat-3_8201_2src_2outfile_8c" alt=""/></div>
<map name="_h_1_2_t_d_download_2_hashcat_01v3_820_2hashcat-3_8201_2src_2outfile_8c" id="_h_1_2_t_d_download_2_hashcat_01v3_820_2hashcat-3_8201_2src_2outfile_8c">
<area shape="rect"  title=" " alt="" coords="603,5,765,61"/>
<area shape="rect"  title=" " alt="" coords="5,109,88,136"/>
<area shape="rect"  title=" " alt="" coords="113,109,178,136"/>
<area shape="rect"  title=" " alt="" coords="203,109,283,136"/>
<area shape="rect"  title=" " alt="" coords="307,109,370,136"/>
<area shape="rect"  title=" " alt="" coords="395,109,469,136"/>
<area shape="rect"  title=" " alt="" coords="493,109,576,136"/>
<area shape="rect"  title=" " alt="" coords="600,109,675,136"/>
<area shape="rect"  title=" " alt="" coords="699,109,765,136"/>
<area shape="rect"  title=" " alt="" coords="789,109,833,136"/>
<area shape="rect"  title=" " alt="" coords="857,109,991,136"/>
<area shape="rect"  title=" " alt="" coords="1015,109,1086,136"/>
<area shape="rect"  title=" " alt="" coords="1111,109,1183,136"/>
<area shape="rect"  title=" " alt="" coords="1207,109,1273,136"/>
<area shape="rect"  title=" " alt="" coords="1297,109,1372,136"/>
</map>
</div>
</div>
<p><a href="outfile_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a1553046f7ee2bb2c5568c75baf15e4a8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="outfile_8c.html#a1553046f7ee2bb2c5568c75baf15e4a8">build_plain</a> (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, plain_t *plain, u32 *plain_buf, int *out_len)</td></tr>
<tr class="separator:a1553046f7ee2bb2c5568c75baf15e4a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02038080b6eae1e564d8202d3b03f436"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="outfile_8c.html#a02038080b6eae1e564d8202d3b03f436">build_crackpos</a> (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, plain_t *plain, u64 *out_pos)</td></tr>
<tr class="separator:a02038080b6eae1e564d8202d3b03f436"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf3cdc6308453bdcab6860307bb3e02d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="outfile_8c.html#acf3cdc6308453bdcab6860307bb3e02d">build_debugdata</a> (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, plain_t *plain, u8 *debug_rule_buf, int *debug_rule_len, u8 *debug_plain_ptr, int *debug_plain_len)</td></tr>
<tr class="separator:acf3cdc6308453bdcab6860307bb3e02d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9cb34b09189a2f1b4a6e0e0c3519526"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="outfile_8c.html#ab9cb34b09189a2f1b4a6e0e0c3519526">outfile_init</a> (hashcat_ctx_t *hashcat_ctx)</td></tr>
<tr class="separator:ab9cb34b09189a2f1b4a6e0e0c3519526"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e4787d7dc982a7fc97f848cf12f6430"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="outfile_8c.html#a6e4787d7dc982a7fc97f848cf12f6430">outfile_destroy</a> (hashcat_ctx_t *hashcat_ctx)</td></tr>
<tr class="separator:a6e4787d7dc982a7fc97f848cf12f6430"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2085d3798d2f36b34c3d3a87604364dc"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="outfile_8c.html#a2085d3798d2f36b34c3d3a87604364dc">outfile_write_open</a> (hashcat_ctx_t *hashcat_ctx)</td></tr>
<tr class="separator:a2085d3798d2f36b34c3d3a87604364dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ee7c764adf45c57931ed799c23f6c64"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="outfile_8c.html#a0ee7c764adf45c57931ed799c23f6c64">outfile_write_close</a> (hashcat_ctx_t *hashcat_ctx)</td></tr>
<tr class="separator:a0ee7c764adf45c57931ed799c23f6c64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adaa59c594cc2e7c8c6ee05a6117c5313"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="outfile_8c.html#adaa59c594cc2e7c8c6ee05a6117c5313">outfile_write</a> (hashcat_ctx_t *hashcat_ctx, const char *out_buf, const unsigned char *plain_ptr, const u32 plain_len, const u64 crackpos, const unsigned char *username, const u32 user_len, char tmp_buf[HCBUFSIZ_LARGE])</td></tr>
<tr class="separator:adaa59c594cc2e7c8c6ee05a6117c5313"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a596aa33c54c0b30afa011785439f0750"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="outfile_8c.html#a596aa33c54c0b30afa011785439f0750">outfile_and_hashfile</a> (hashcat_ctx_t *hashcat_ctx)</td></tr>
<tr class="separator:a596aa33c54c0b30afa011785439f0750"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a02038080b6eae1e564d8202d3b03f436"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a02038080b6eae1e564d8202d3b03f436">&#9670;&nbsp;</a></span>build_crackpos()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int build_crackpos </td>
          <td>(</td>
          <td class="paramtype">hashcat_ctx_t *&#160;</td>
          <td class="paramname"><em>hashcat_ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">hc_device_param_t *&#160;</td>
          <td class="paramname"><em>device_param</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">plain_t *&#160;</td>
          <td class="paramname"><em>plain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u64 *&#160;</td>
          <td class="paramname"><em>out_pos</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="outfile_8c_source.html#l00193">193</a> of file <a class="el" href="outfile_8c_source.html">outfile.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;{</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;  <span class="keyword">const</span> combinator_ctx_t      *combinator_ctx     = hashcat_ctx-&gt;combinator_ctx;</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;  <span class="keyword">const</span> mask_ctx_t            *mask_ctx           = hashcat_ctx-&gt;mask_ctx;</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;  <span class="keyword">const</span> straight_ctx_t        *straight_ctx       = hashcat_ctx-&gt;straight_ctx;</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;  <span class="keyword">const</span> user_options_extra_t  *user_options_extra = hashcat_ctx-&gt;user_options_extra;</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;  <span class="keyword">const</span> u32 gidvid = plain-&gt;gidvid;</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;  <span class="keyword">const</span> u32 il_pos = plain-&gt;il_pos;</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;  u64 crackpos = device_param-&gt;words_off;</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;  <span class="keywordflow">if</span> (user_options_extra-&gt;attack_kern == ATTACK_KERN_STRAIGHT)</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;  {</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    crackpos += gidvid;</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;    crackpos *= straight_ctx-&gt;kernel_rules_cnt;</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    crackpos += device_param-&gt;innerloop_pos + il_pos;</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;  }</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (user_options_extra-&gt;attack_kern == ATTACK_KERN_COMBI)</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;  {</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    crackpos += gidvid;</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    crackpos *= combinator_ctx-&gt;combs_cnt;</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;    crackpos += device_param-&gt;innerloop_pos + il_pos;</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;  }</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (user_options_extra-&gt;attack_kern == ATTACK_MODE_BF)</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;  {</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;    crackpos += gidvid;</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;    crackpos *= mask_ctx-&gt;bfs_cnt;</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    crackpos += device_param-&gt;innerloop_pos + il_pos;</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;  }</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;  *out_pos = crackpos;</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;}</div></div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="hashes_8c_source.html#l00237">check_hash()</a>.</p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="outfile_8c_a02038080b6eae1e564d8202d3b03f436_icgraph.gif" border="0" usemap="#outfile_8c_a02038080b6eae1e564d8202d3b03f436_icgraph" alt=""/></div>
<map name="outfile_8c_a02038080b6eae1e564d8202d3b03f436_icgraph" id="outfile_8c_a02038080b6eae1e564d8202d3b03f436_icgraph">
<area shape="rect"  title=" " alt="" coords="1508,81,1617,108"/>
<area shape="rect"  href="hashes_8c.html#a941bbcf804b81ac407d485859bf87999" title=" " alt="" coords="1368,81,1460,108"/>
<area shape="rect"  href="hashes_8c.html#a98055a12599ed1bd53da5c0694605f3d" title=" " alt="" coords="1209,81,1320,108"/>
<area shape="rect"  href="opencl_8c.html#af8bef12676549083a86b2986c456f72d" title=" " alt="" coords="1071,56,1161,83"/>
<area shape="rect"  href="weak__hash_8c.html#a410a6e1cce44e8f0c4cde8ec7d00ecd8" title=" " alt="" coords="592,107,721,133"/>
<area shape="rect"  href="dispatch_8c.html#a0502555fe69aef3e7b8c3886ef18c145" title=" " alt="" coords="959,5,1005,32"/>
<area shape="rect"  href="dispatch_8c.html#a274118ca9e580459d6e82f6d61a34d59" title=" " alt="" coords="941,56,1023,83"/>
<area shape="rect"  href="dispatch_8c.html#a45ffdf5a91d67bdc7a27b7fe7d39761a" title=" " alt="" coords="787,5,876,32"/>
<area shape="rect"  href="hashcat_8c.html#a9ec4f74d423ae0bd4aa6e960632b7086" title=" " alt="" coords="613,56,701,83"/>
<area shape="rect"  href="hashcat_8c.html#ad6cc36d03dcdad3413c794efecb3178a" title=" " alt="" coords="456,56,544,83"/>
<area shape="rect"  href="hashcat_8c.html#ac33e9695b713153c0fc7cce11696704b" title=" " alt="" coords="325,81,408,108"/>
<area shape="rect"  href="hashcat_8c.html#ac49fece3f82732fda9eb29766cc01168" title=" " alt="" coords="104,81,277,108"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,81,56,108"/>
<area shape="rect"  href="dispatch_8c.html#a9e518ec031f388304424fb2852075038" title=" " alt="" coords="769,56,893,83"/>
</map>
</div>

</div>
</div>
<a id="acf3cdc6308453bdcab6860307bb3e02d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acf3cdc6308453bdcab6860307bb3e02d">&#9670;&nbsp;</a></span>build_debugdata()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int build_debugdata </td>
          <td>(</td>
          <td class="paramtype">hashcat_ctx_t *&#160;</td>
          <td class="paramname"><em>hashcat_ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">hc_device_param_t *&#160;</td>
          <td class="paramname"><em>device_param</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">plain_t *&#160;</td>
          <td class="paramname"><em>plain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>debug_rule_buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>debug_rule_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8 *&#160;</td>
          <td class="paramname"><em>debug_plain_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>debug_plain_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="outfile_8c_source.html#l00229">229</a> of file <a class="el" href="outfile_8c_source.html">outfile.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;{</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;  <span class="keyword">const</span> debugfile_ctx_t *debugfile_ctx = hashcat_ctx-&gt;debugfile_ctx;</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;  <span class="keyword">const</span> straight_ctx_t  *straight_ctx  = hashcat_ctx-&gt;straight_ctx;</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;  <span class="keyword">const</span> user_options_t  *user_options  = hashcat_ctx-&gt;user_options;</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;  <span class="keyword">const</span> u32 gidvid = plain-&gt;gidvid;</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;  <span class="keyword">const</span> u32 il_pos = plain-&gt;il_pos;</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;  <span class="keywordflow">if</span> (user_options-&gt;attack_mode != ATTACK_MODE_STRAIGHT) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;  <span class="keyword">const</span> u32 debug_mode = debugfile_ctx-&gt;mode;</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;  <span class="keywordflow">if</span> (debug_mode == 0) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;  pw_t pw;</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;  <span class="keyword">const</span> <span class="keywordtype">int</span> rc = <a class="code" href="opencl_8c.html#ade369d76f252c3c3a33a2ffed95c5824">gidd_to_pw_t</a> (hashcat_ctx, device_param, gidvid, &amp;pw);</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;  <span class="keywordflow">if</span> (rc == -1) <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;  <span class="keywordtype">int</span> plain_len = (int) pw.pw_len;</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;  <span class="keyword">const</span> u32 off = device_param-&gt;innerloop_pos + il_pos;</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;  <span class="comment">// save rule</span></div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;  if ((debug_mode == 1) || (debug_mode == 3) || (debug_mode == 4))</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;  {</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">int</span> len = <a class="code" href="rp_8c.html#ad3f9ece911627108f081173aa00a9ce9">kernel_rule_to_cpu_rule</a> ((<span class="keywordtype">char</span> *) debug_rule_buf, &amp;straight_ctx-&gt;kernel_rules_buf[off]);</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;    debug_rule_buf[len] = 0;</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;    *debug_rule_len = len;</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;  }</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;  <span class="comment">// save plain</span></div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;  <span class="keywordflow">if</span> ((debug_mode == 2) || (debug_mode == 3) || (debug_mode == 4))</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;  {</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;    memcpy (debug_plain_ptr, (<span class="keywordtype">char</span> *) pw.i, (<span class="keywordtype">size_t</span>) plain_len);</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;    debug_plain_ptr[plain_len] = 0;</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;    *debug_plain_len = plain_len;</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;  }</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;}</div><div class="ttc" id="rp_8c_html_ad3f9ece911627108f081173aa00a9ce9"><div class="ttname"><a href="rp_8c.html#ad3f9ece911627108f081173aa00a9ce9">kernel_rule_to_cpu_rule</a></div><div class="ttdeci">int kernel_rule_to_cpu_rule(char *rule_buf, kernel_rule_t *rule)</div><div class="ttdef"><b>Definition:</b> <a href="rp_8c_source.html#l00476">rp.c:476</a></div></div>
<div class="ttc" id="opencl_8c_html_ade369d76f252c3c3a33a2ffed95c5824"><div class="ttname"><a href="opencl_8c.html#ade369d76f252c3c3a33a2ffed95c5824">gidd_to_pw_t</a></div><div class="ttdeci">int gidd_to_pw_t(hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 gidd, pw_t *pw)</div><div class="ttdef"><b>Definition:</b> <a href="opencl_8c_source.html#l01055">opencl.c:1055</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="opencl_8c_source.html#l01055">gidd_to_pw_t()</a>, and <a class="el" href="rp_8c_source.html#l00476">kernel_rule_to_cpu_rule()</a>.</p>

<p class="reference">Referenced by <a class="el" href="hashes_8c_source.html#l00237">check_hash()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="outfile_8c_acf3cdc6308453bdcab6860307bb3e02d_cgraph.gif" border="0" usemap="#outfile_8c_acf3cdc6308453bdcab6860307bb3e02d_cgraph" alt=""/></div>
<map name="outfile_8c_acf3cdc6308453bdcab6860307bb3e02d_cgraph" id="outfile_8c_acf3cdc6308453bdcab6860307bb3e02d_cgraph">
<area shape="rect"  title=" " alt="" coords="5,2320,121,2347"/>
<area shape="rect"  href="opencl_8c.html#ade369d76f252c3c3a33a2ffed95c5824" title=" " alt="" coords="199,2295,298,2321"/>
<area shape="rect"  href="rp_8c.html#ad3f9ece911627108f081173aa00a9ce9" title=" " alt="" coords="169,2345,328,2372"/>
<area shape="rect"  href="opencl_8c.html#a707b32d6170142181dc47bc668c03efa" title=" " alt="" coords="376,2295,543,2321"/>
<area shape="rect"  href="main_8c.html#a73c3170c7171851eb6e8f5a402599423" title=" " alt="" coords="606,1191,658,1217"/>
<area shape="rect"  href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5" title=" " alt="" coords="976,1757,1085,1784"/>
<area shape="rect"  href="ext___open_c_l_8c.html#a0453328057c0dd0716348f4e7e8e7f2f" title=" " alt="" coords="591,2345,673,2372"/>
<area shape="rect"  href="main_8c.html#a32267a9babef2011cb79b27389761e15" title=" " alt="" coords="749,5,901,32"/>
<area shape="rect"  href="main_8c.html#ad3627f8345a7b1bc960aafdef1f2f0ef" title=" " alt="" coords="752,56,897,83"/>
<area shape="rect"  href="main_8c.html#a9620c3b5872c1ca3d6305ec3ec455e96" title=" " alt="" coords="729,107,921,133"/>
<area shape="rect"  href="main_8c.html#af6ada2a7aa24abc385db81bf2967d967" title=" " alt="" coords="749,157,900,184"/>
<area shape="rect"  href="main_8c.html#aee0ffb60de12a2149c38d0edb63c6873" title=" " alt="" coords="731,208,919,235"/>
<area shape="rect"  href="main_8c.html#a8c9b1c83b7606323b8301c9d23bc634f" title=" " alt="" coords="749,259,900,285"/>
<area shape="rect"  href="main_8c.html#aa8d4b6fa908a9962722ea52e249382a4" title=" " alt="" coords="754,310,895,351"/>
<area shape="rect"  href="main_8c.html#a4148cb046224f2fbc2a6422cc2fc3efb" title=" " alt="" coords="754,375,895,417"/>
<area shape="rect"  href="main_8c.html#acb10729db6d7d5a1387d42b140975389" title=" " alt="" coords="737,441,913,468"/>
<area shape="rect"  href="main_8c.html#a2a02ef79c93a9cd89523098097df0d63" title=" " alt="" coords="759,493,890,534"/>
<area shape="rect"  href="main_8c.html#ad7c2c247c826d9abdffd67a00f5140ab" title=" " alt="" coords="759,558,890,599"/>
<area shape="rect"  href="main_8c.html#ad3f12125746060567fbac4c53a365d71" title=" " alt="" coords="759,623,890,665"/>
<area shape="rect"  href="main_8c.html#a0e6b752854a0c3a5499f94182894fa70" title=" " alt="" coords="759,689,890,730"/>
<area shape="rect"  href="main_8c.html#aa5d28006dcbb9337d16eba43c134f0dc" title=" " alt="" coords="751,754,898,795"/>
<area shape="rect"  href="main_8c.html#ad44cf972b0467fc9ce68a2e045792849" title=" " alt="" coords="751,819,898,861"/>
<area shape="rect"  href="main_8c.html#a82c45b927b627b6243257121923ff1c1" title=" " alt="" coords="771,885,878,912"/>
<area shape="rect"  href="main_8c.html#af36f0f358982cbfc00b8248b9bf215e7" title=" " alt="" coords="774,936,875,963"/>
<area shape="rect"  href="main_8c.html#a047b84b0f27822ca6047f2c641ec7dc9" title=" " alt="" coords="762,987,887,1013"/>
<area shape="rect"  href="main_8c.html#a81e677be48184cc3faa78714c5a01d72" title=" " alt="" coords="721,1037,928,1064"/>
<area shape="rect"  href="main_8c.html#ae7a8d2980fee327d884b414eeba9ffd5" title=" " alt="" coords="749,1089,900,1130"/>
<area shape="rect"  href="main_8c.html#a4e664697b793b6744c9849c1de53a051" title=" " alt="" coords="753,1154,896,1195"/>
<area shape="rect"  href="main_8c.html#a492c76a917f4179db240bfb6d32769cf" title=" " alt="" coords="739,1220,911,1247"/>
<area shape="rect"  href="main_8c.html#a34dc58a412cf235a16ca6236abe13e8a" title=" " alt="" coords="747,1271,902,1297"/>
<area shape="rect"  href="main_8c.html#af4dfd3b68c576941d9af849584e56ceb" title=" " alt="" coords="747,1321,902,1348"/>
<area shape="rect"  href="main_8c.html#a42a84f3c9beb52724b302e6192604dc0" title=" " alt="" coords="747,1372,902,1399"/>
<area shape="rect"  href="main_8c.html#ade3d07fe437c59af15d5d95a2bdbaf49" title=" " alt="" coords="735,1423,914,1449"/>
<area shape="rect"  href="main_8c.html#a6f09e4d5077ee9455ca3f3fdfa7cd2d5" title=" " alt="" coords="739,1473,911,1500"/>
<area shape="rect"  href="main_8c.html#a41bef1228c9e87ba855a26e6c7a37f5a" title=" " alt="" coords="744,1524,905,1551"/>
<area shape="rect"  href="main_8c.html#a46df1c8d07283dc4798853c4ae078879" title=" " alt="" coords="733,1575,917,1601"/>
<area shape="rect"  href="main_8c.html#aa9cb60ea1fd75f8faf5ce16454f526ec" title=" " alt="" coords="745,1625,905,1652"/>
<area shape="rect"  href="main_8c.html#a7bf22ab4e7ae4fc7bb4565672944be28" title=" " alt="" coords="743,1676,907,1703"/>
<area shape="rect"  href="main_8c.html#a22b7b97154dcb9c0553a118b3e83c876" title=" " alt="" coords="749,1727,900,1753"/>
<area shape="rect"  href="main_8c.html#a775b2b69117d095a1948daead6cb335e" title=" " alt="" coords="743,1777,906,1804"/>
<area shape="rect"  href="main_8c.html#aac920722d3578cb5aec25c2c9879ef31" title=" " alt="" coords="737,1828,913,1855"/>
<area shape="rect"  href="main_8c.html#a10ed4ad50d5a29f3df3d2e11b2b81a1c" title=" " alt="" coords="755,1879,894,1921"/>
<area shape="rect"  href="main_8c.html#a53b0019b05d5daabf258fcb71bc080b9" title=" " alt="" coords="755,1945,894,1986"/>
<area shape="rect"  href="main_8c.html#a8addc398c08945b966145d07787999b2" title=" " alt="" coords="745,2010,904,2051"/>
<area shape="rect"  href="main_8c.html#a7b3f4dbebb06dc8b76a13f5952450aba" title=" " alt="" coords="747,2076,902,2103"/>
<area shape="rect"  href="main_8c.html#a5f8ae302e96db42897362b72268556be" title=" " alt="" coords="751,2127,898,2153"/>
<area shape="rect"  href="main_8c.html#a015f20f6e8d5c353e869f72255e15723" title=" " alt="" coords="753,2178,896,2219"/>
<area shape="rect"  href="main_8c.html#ad88ad31cb7c92007dc9656c377d6fe4b" title=" " alt="" coords="743,2244,907,2271"/>
<area shape="rect"  href="event_8c.html#a6221c6caa1d2069ad1c3103f0b013ef7" title=" " alt="" coords="1133,1732,1212,1759"/>
<area shape="rect"  href="event_8c.html#ad5a30ac9dc4301540e19643500eb78e4" title=" " alt="" coords="1135,1783,1211,1809"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="outfile_8c_acf3cdc6308453bdcab6860307bb3e02d_icgraph.gif" border="0" usemap="#outfile_8c_acf3cdc6308453bdcab6860307bb3e02d_icgraph" alt=""/></div>
<map name="outfile_8c_acf3cdc6308453bdcab6860307bb3e02d_icgraph" id="outfile_8c_acf3cdc6308453bdcab6860307bb3e02d_icgraph">
<area shape="rect"  title=" " alt="" coords="1508,81,1624,108"/>
<area shape="rect"  href="hashes_8c.html#a941bbcf804b81ac407d485859bf87999" title=" " alt="" coords="1368,81,1460,108"/>
<area shape="rect"  href="hashes_8c.html#a98055a12599ed1bd53da5c0694605f3d" title=" " alt="" coords="1209,81,1320,108"/>
<area shape="rect"  href="opencl_8c.html#af8bef12676549083a86b2986c456f72d" title=" " alt="" coords="1071,56,1161,83"/>
<area shape="rect"  href="weak__hash_8c.html#a410a6e1cce44e8f0c4cde8ec7d00ecd8" title=" " alt="" coords="592,107,721,133"/>
<area shape="rect"  href="dispatch_8c.html#a0502555fe69aef3e7b8c3886ef18c145" title=" " alt="" coords="959,5,1005,32"/>
<area shape="rect"  href="dispatch_8c.html#a274118ca9e580459d6e82f6d61a34d59" title=" " alt="" coords="941,56,1023,83"/>
<area shape="rect"  href="dispatch_8c.html#a45ffdf5a91d67bdc7a27b7fe7d39761a" title=" " alt="" coords="787,5,876,32"/>
<area shape="rect"  href="hashcat_8c.html#a9ec4f74d423ae0bd4aa6e960632b7086" title=" " alt="" coords="613,56,701,83"/>
<area shape="rect"  href="hashcat_8c.html#ad6cc36d03dcdad3413c794efecb3178a" title=" " alt="" coords="456,56,544,83"/>
<area shape="rect"  href="hashcat_8c.html#ac33e9695b713153c0fc7cce11696704b" title=" " alt="" coords="325,81,408,108"/>
<area shape="rect"  href="hashcat_8c.html#ac49fece3f82732fda9eb29766cc01168" title=" " alt="" coords="104,81,277,108"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,81,56,108"/>
<area shape="rect"  href="dispatch_8c.html#a9e518ec031f388304424fb2852075038" title=" " alt="" coords="769,56,893,83"/>
</map>
</div>

</div>
</div>
<a id="a1553046f7ee2bb2c5568c75baf15e4a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1553046f7ee2bb2c5568c75baf15e4a8">&#9670;&nbsp;</a></span>build_plain()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int build_plain </td>
          <td>(</td>
          <td class="paramtype">hashcat_ctx_t *&#160;</td>
          <td class="paramname"><em>hashcat_ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">hc_device_param_t *&#160;</td>
          <td class="paramname"><em>device_param</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">plain_t *&#160;</td>
          <td class="paramname"><em>plain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u32 *&#160;</td>
          <td class="paramname"><em>plain_buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>out_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Author......: See docs/credits.txt License.....: MIT </p>

<p class="definition">Definition at line <a class="el" href="outfile_8c_source.html#l00021">21</a> of file <a class="el" href="outfile_8c_source.html">outfile.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;{</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;  <span class="keyword">const</span> combinator_ctx_t *combinator_ctx = hashcat_ctx-&gt;combinator_ctx;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;  <span class="keyword">const</span> hashconfig_t     *hashconfig     = hashcat_ctx-&gt;hashconfig;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;  <span class="keyword">const</span> hashes_t         *hashes         = hashcat_ctx-&gt;hashes;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;  <span class="keyword">const</span> mask_ctx_t       *mask_ctx       = hashcat_ctx-&gt;mask_ctx;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;  <span class="keyword">const</span> straight_ctx_t   *straight_ctx   = hashcat_ctx-&gt;straight_ctx;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;  <span class="keyword">const</span> user_options_t   *user_options   = hashcat_ctx-&gt;user_options;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;  <span class="keyword">const</span> u32 gidvid = plain-&gt;gidvid;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;  <span class="keyword">const</span> u32 il_pos = plain-&gt;il_pos;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;  <span class="keywordtype">int</span> plain_len = 0;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;  u8 *plain_ptr = (u8 *) plain_buf;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  <span class="keywordflow">if</span> (user_options-&gt;attack_mode == ATTACK_MODE_STRAIGHT)</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  {</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    pw_t pw;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">int</span> rc = <a class="code" href="opencl_8c.html#ade369d76f252c3c3a33a2ffed95c5824">gidd_to_pw_t</a> (hashcat_ctx, device_param, gidvid, &amp;pw);</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="keywordflow">if</span> (rc == -1) <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 16; i++)</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    {</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;      plain_buf[i] = pw.i[i];</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    }</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    plain_len = (int) pw.pw_len;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keyword">const</span> u32 off = device_param-&gt;innerloop_pos + il_pos;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    plain_len = (<span class="keywordtype">int</span>) <a class="code" href="rp__kernel__on__cpu_8c.html#ad41ac763f5abd24635efc622ada01e6c">apply_rules</a> (straight_ctx-&gt;kernel_rules_buf[off].cmds, &amp;plain_buf[0], &amp;plain_buf[4], (u32) plain_len);</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="keywordflow">if</span> (plain_len &gt; (<span class="keywordtype">int</span>) hashconfig-&gt;pw_max) plain_len = (int) hashconfig-&gt;pw_max;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  }</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (user_options-&gt;attack_mode == ATTACK_MODE_COMBI)</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;  {</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    pw_t pw;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">int</span> rc = <a class="code" href="opencl_8c.html#ade369d76f252c3c3a33a2ffed95c5824">gidd_to_pw_t</a> (hashcat_ctx, device_param, gidvid, &amp;pw);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <span class="keywordflow">if</span> (rc == -1) <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 16; i++)</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    {</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;      plain_buf[i] = pw.i[i];</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    }</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    plain_len = (int) pw.pw_len;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    <span class="keywordtype">char</span> *comb_buf = (<span class="keywordtype">char</span> *) device_param-&gt;combs_buf[il_pos].i;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    u32   comb_len =          device_param-&gt;combs_buf[il_pos].pw_len;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="keywordflow">if</span> (combinator_ctx-&gt;combs_mode == COMBINATOR_MODE_BASE_LEFT)</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    {</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;      memcpy (plain_ptr + plain_len, comb_buf, (<span class="keywordtype">size_t</span>) comb_len);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    }</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    {</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;      memmove (plain_ptr + comb_len, plain_ptr, (<span class="keywordtype">size_t</span>) plain_len);</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;      memcpy (plain_ptr, comb_buf, comb_len);</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    }</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    plain_len += comb_len;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    <span class="keywordflow">if</span> (plain_len &gt; (<span class="keywordtype">int</span>) hashconfig-&gt;pw_max) plain_len = (int) hashconfig-&gt;pw_max;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;  }</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (user_options-&gt;attack_mode == ATTACK_MODE_BF)</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;  {</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    u64 l_off = device_param-&gt;kernel_params_mp_l_buf64[3] + gidvid;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    u64 r_off = device_param-&gt;kernel_params_mp_r_buf64[3] + il_pos;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    u32 l_start = device_param-&gt;kernel_params_mp_l_buf32[5];</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    u32 r_start = device_param-&gt;kernel_params_mp_r_buf32[5];</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    u32 l_stop = device_param-&gt;kernel_params_mp_l_buf32[4];</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    u32 r_stop = device_param-&gt;kernel_params_mp_r_buf32[4];</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <a class="code" href="mpsp_8c.html#a5e229e32c227313b62c72088ff76c835">sp_exec</a> (l_off, (<span class="keywordtype">char</span> *) plain_ptr + l_start, mask_ctx-&gt;root_css_buf, mask_ctx-&gt;markov_css_buf, l_start, l_start + l_stop);</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <a class="code" href="mpsp_8c.html#a5e229e32c227313b62c72088ff76c835">sp_exec</a> (r_off, (<span class="keywordtype">char</span> *) plain_ptr + r_start, mask_ctx-&gt;root_css_buf, mask_ctx-&gt;markov_css_buf, r_start, r_start + r_stop);</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    plain_len = (int) mask_ctx-&gt;css_cnt;</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;  }</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (user_options-&gt;attack_mode == ATTACK_MODE_HYBRID1)</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;  {</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    pw_t pw;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">int</span> rc = <a class="code" href="opencl_8c.html#ade369d76f252c3c3a33a2ffed95c5824">gidd_to_pw_t</a> (hashcat_ctx, device_param, gidvid, &amp;pw);</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    <span class="keywordflow">if</span> (rc == -1) <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 16; i++)</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    {</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;      plain_buf[i] = pw.i[i];</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    }</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    plain_len = (int) pw.pw_len;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    u64 off = device_param-&gt;kernel_params_mp_buf64[3] + il_pos;</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    u32 start = 0;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    u32 stop  = device_param-&gt;kernel_params_mp_buf32[4];</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <a class="code" href="mpsp_8c.html#a5e229e32c227313b62c72088ff76c835">sp_exec</a> (off, (<span class="keywordtype">char</span> *) plain_ptr + plain_len, mask_ctx-&gt;root_css_buf, mask_ctx-&gt;markov_css_buf, start, start + stop);</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    plain_len += start + stop;</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <span class="keywordflow">if</span> (plain_len &gt; (<span class="keywordtype">int</span>) hashconfig-&gt;pw_max) plain_len = (<span class="keywordtype">int</span>) hashconfig-&gt;pw_max;</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;  }</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (user_options-&gt;attack_mode == ATTACK_MODE_HYBRID2)</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;  {</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    pw_t pw;</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">int</span> rc = <a class="code" href="opencl_8c.html#ade369d76f252c3c3a33a2ffed95c5824">gidd_to_pw_t</a> (hashcat_ctx, device_param, gidvid, &amp;pw);</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    <span class="keywordflow">if</span> (rc == -1) <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; 16; i++)</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    {</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;      plain_buf[i] = pw.i[i];</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    }</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    plain_len = (int) pw.pw_len;</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    u64 off = device_param-&gt;kernel_params_mp_buf64[3] + il_pos;</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    u32 start = 0;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    u32 stop  = device_param-&gt;kernel_params_mp_buf32[4];</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    memmove (plain_ptr + stop, plain_ptr, plain_len);</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <a class="code" href="mpsp_8c.html#a5e229e32c227313b62c72088ff76c835">sp_exec</a> (off, (<span class="keywordtype">char</span> *) plain_ptr, mask_ctx-&gt;root_css_buf, mask_ctx-&gt;markov_css_buf, start, start + stop);</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    plain_len += start + stop;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    <span class="keywordflow">if</span> (plain_len &gt; (<span class="keywordtype">int</span>) hashconfig-&gt;pw_max) plain_len = (int) hashconfig-&gt;pw_max;</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;  }</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;  <span class="keywordflow">if</span> (user_options-&gt;attack_mode == ATTACK_MODE_BF)</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;  {</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <span class="keywordflow">if</span> (hashconfig-&gt;opti_type &amp; OPTI_TYPE_BRUTE_FORCE) <span class="comment">// lots of optimizations can happen here</span></div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    {</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;      <span class="keywordflow">if</span> (hashconfig-&gt;opti_type &amp; OPTI_TYPE_SINGLE_HASH)</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;      {</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        <span class="keywordflow">if</span> (hashconfig-&gt;opti_type &amp; OPTI_TYPE_APPENDED_SALT)</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;        {</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;          plain_len = plain_len - hashes-&gt;salts_buf[0].salt_len;</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;        }</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;      }</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;      <span class="keywordflow">if</span> (hashconfig-&gt;opts_type &amp; OPTS_TYPE_PT_UNICODE)</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;      {</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0, j = 0; i &lt; plain_len; i += 2, j += 1)</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        {</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;          plain_ptr[j] = plain_ptr[i];</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;        }</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        plain_len = plain_len / 2;</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;      }</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    }</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;  }</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;  plain_ptr[plain_len] = 0;</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;  *out_len = plain_len;</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;}</div><div class="ttc" id="rp__kernel__on__cpu_8c_html_ad41ac763f5abd24635efc622ada01e6c"><div class="ttname"><a href="rp__kernel__on__cpu_8c.html#ad41ac763f5abd24635efc622ada01e6c">apply_rules</a></div><div class="ttdeci">u32 apply_rules(u32 *cmds, u32 buf0[4], u32 buf1[4], const u32 len)</div><div class="ttdef"><b>Definition:</b> <a href="rp__kernel__on__cpu_8c_source.html#l02568">rp_kernel_on_cpu.c:2568</a></div></div>
<div class="ttc" id="mpsp_8c_html_a5e229e32c227313b62c72088ff76c835"><div class="ttname"><a href="mpsp_8c.html#a5e229e32c227313b62c72088ff76c835">sp_exec</a></div><div class="ttdeci">void sp_exec(u64 ctx, char *pw_buf, cs_t *root_css_buf, cs_t *markov_css_buf, u32 start, u32 stop)</div><div class="ttdef"><b>Definition:</b> <a href="mpsp_8c_source.html#l00889">mpsp.c:889</a></div></div>
<div class="ttc" id="opencl_8c_html_ade369d76f252c3c3a33a2ffed95c5824"><div class="ttname"><a href="opencl_8c.html#ade369d76f252c3c3a33a2ffed95c5824">gidd_to_pw_t</a></div><div class="ttdeci">int gidd_to_pw_t(hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 gidd, pw_t *pw)</div><div class="ttdef"><b>Definition:</b> <a href="opencl_8c_source.html#l01055">opencl.c:1055</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="rp__kernel__on__cpu_8c_source.html#l02568">apply_rules()</a>, <a class="el" href="opencl_8c_source.html#l01055">gidd_to_pw_t()</a>, and <a class="el" href="mpsp_8c_source.html#l00889">sp_exec()</a>.</p>

<p class="reference">Referenced by <a class="el" href="hashes_8c_source.html#l00237">check_hash()</a>, and <a class="el" href="status_8c_source.html#l00691">status_get_input_candidates_dev()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="outfile_8c_a1553046f7ee2bb2c5568c75baf15e4a8_cgraph.gif" border="0" usemap="#outfile_8c_a1553046f7ee2bb2c5568c75baf15e4a8_cgraph" alt=""/></div>
<map name="outfile_8c_a1553046f7ee2bb2c5568c75baf15e4a8_cgraph" id="outfile_8c_a1553046f7ee2bb2c5568c75baf15e4a8_cgraph">
<area shape="rect"  title=" " alt="" coords="5,1907,88,1934"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#ad41ac763f5abd24635efc622ada01e6c" title=" " alt="" coords="141,1345,229,1371"/>
<area shape="rect"  href="opencl_8c.html#ade369d76f252c3c3a33a2ffed95c5824" title=" " alt="" coords="136,1907,235,1934"/>
<area shape="rect"  href="mpsp_8c.html#a5e229e32c227313b62c72088ff76c835" title=" " alt="" coords="150,1958,221,1985"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#ab4171b05ccd192504e61536d49e43cc1" title=" " alt="" coords="325,1087,407,1114"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a13f2b507bf43cef1feb54611af2e9254" title=" " alt="" coords="766,197,911,223"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#aae6c23373e859293271f2c2b71f25152" title=" " alt="" coords="764,298,913,325"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a4f23a24ed66c721467921872d20009ce" title=" " alt="" coords="528,224,673,265"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a36514fd479e9f21e781845a74ec756d5" title=" " alt="" coords="526,341,675,383"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#ac6549dc102882ec11b9b055629e45303" title=" " alt="" coords="765,403,912,430"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a4f9376a50f6e4fd76d3bbd066a37bf27" title=" " alt="" coords="752,457,925,483"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#ac6293ace6aefe96df484a9538a624fbb" title=" " alt="" coords="520,509,681,535"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#ae833c9047a6b3aa6d4a822132a872ab7" title=" " alt="" coords="513,559,688,586"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a15c4297cde6be009e9f51955e5192ab3" title=" " alt="" coords="513,611,688,652"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#adca7875ade5e937cd6d8eae15b8a5e98" title=" " alt="" coords="523,677,678,703"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#af7524e171e476a4c9ff0745dc043678b" title=" " alt="" coords="519,727,682,754"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a3eccc6ccc117b8c10eb2676d13cc0406" title=" " alt="" coords="517,778,684,805"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a73d1b56081259443c7252ebf16bcc9e8" title=" " alt="" coords="512,829,689,855"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a215b7b5e398f2a70252349b4665082ad" title=" " alt="" coords="524,880,677,921"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a55d19d75d2ecaeec2aa2a4540b054c4f" title=" " alt="" coords="523,945,678,987"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a44dfa7a1909cafd6f0a6095465323caf" title=" " alt="" coords="509,1011,692,1038"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#aa13562eddcd5310a76242099e688071b" title=" " alt="" coords="514,1062,687,1089"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a7d752576ef1ae897dae7e274abbad90b" title=" " alt="" coords="521,1113,681,1139"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#af7115583cb2a79e6dfb781e00ae6841d" title=" " alt="" coords="528,1163,673,1190"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#ab63513a61f0a5813a0cd3170cbd6feb6" title=" " alt="" coords="525,1214,677,1241"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a9d0c00892330eb9dadfb303ed2486132" title=" " alt="" coords="513,1265,688,1291"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#aa7e95b4d4521a488950f6c7b74eb8a05" title=" " alt="" coords="508,1315,693,1342"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a27423243c39f31cf922ef2210074aadb" title=" " alt="" coords="519,1366,682,1393"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a0a609f1994d8b310699014db9e9ca10e" title=" " alt="" coords="512,1417,689,1443"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a5529e3cc0eb025b51b1333b06b121ed4" title=" " alt="" coords="514,1468,687,1509"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#ae5875e03900134bdefbdaa7c9b64925c" title=" " alt="" coords="500,1534,701,1561"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#accbcab3ebc26f42fe582468904cae01d" title=" " alt="" coords="504,1585,697,1611"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a0f70dd8ea0b79815ed1ea2ad55624fb2" title=" " alt="" coords="522,1636,679,1677"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a05e1c1555ad65ec03d8a63c31967717b" title=" " alt="" coords="508,1702,693,1729"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#ad581d14f1fe530b5a5c2e98ce0aa175a" title=" " alt="" coords="513,1753,688,1779"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a8bcdb7bc62c0313d1ae3c840ca009445" title=" " alt="" coords="531,1804,670,1845"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a67cd70282c4f533e38dd643495655fb7" title=" " alt="" coords="531,1869,670,1911"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a5f119af51d84e5ed6c20b82092ba257d" title=" " alt="" coords="517,1935,684,1962"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a3d191a714e18b2a964a8517887cef413" title=" " alt="" coords="515,1986,686,2013"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#aba290dc7e33cad5e30255e9353471364" title=" " alt="" coords="505,2037,696,2063"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#ac967ee01b7cbf88c02f740e9dd50417a" title=" " alt="" coords="503,2087,698,2114"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#ab21044bf515b5ae185ad5096f6b817b1" title=" " alt="" coords="511,5,690,47"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a1c8ca1513d9161c6450e0f26efe1a527" title=" " alt="" coords="497,71,704,98"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a23d225a116fd3c46f0ec06b1d0834dc6" title=" " alt="" coords="768,134,909,161"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a18a2407e425022c6eb802c335024eb0d" title=" " alt="" coords="973,298,1092,325"/>
<area shape="rect"  href="rp__kernel__on__cpu_8c.html#a5c62444adb4820b50fca99e7c97d966d" title=" " alt="" coords="788,593,889,619"/>
<area shape="rect"  href="opencl_8c.html#a707b32d6170142181dc47bc668c03efa" title=" " alt="" coords="283,2163,449,2190"/>
<area shape="rect"  href="main_8c.html#a73c3170c7171851eb6e8f5a402599423" title=" " alt="" coords="575,2138,627,2165"/>
<area shape="rect"  href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5" title=" " alt="" coords="546,2189,655,2215"/>
<area shape="rect"  href="ext___open_c_l_8c.html#a0453328057c0dd0716348f4e7e8e7f2f" title=" " alt="" coords="559,2239,642,2266"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="outfile_8c_a1553046f7ee2bb2c5568c75baf15e4a8_icgraph.gif" border="0" usemap="#outfile_8c_a1553046f7ee2bb2c5568c75baf15e4a8_icgraph" alt=""/></div>
<map name="outfile_8c_a1553046f7ee2bb2c5568c75baf15e4a8_icgraph" id="outfile_8c_a1553046f7ee2bb2c5568c75baf15e4a8_icgraph">
<area shape="rect"  title=" " alt="" coords="3540,672,3623,699"/>
<area shape="rect"  href="hashes_8c.html#a941bbcf804b81ac407d485859bf87999" title=" " alt="" coords="3115,672,3207,699"/>
<area shape="rect"  href="status_8c.html#a923fe03c8487c12bd656a22d6dc3f0b7" title=" " alt="" coords="3277,571,3492,598"/>
<area shape="rect"  href="hashes_8c.html#a98055a12599ed1bd53da5c0694605f3d" title=" " alt="" coords="1309,571,1420,598"/>
<area shape="rect"  href="opencl_8c.html#af8bef12676549083a86b2986c456f72d" title=" " alt="" coords="1115,672,1206,699"/>
<area shape="rect"  href="weak__hash_8c.html#a410a6e1cce44e8f0c4cde8ec7d00ecd8" title=" " alt="" coords="1096,571,1225,598"/>
<area shape="rect"  href="dispatch_8c.html#a0502555fe69aef3e7b8c3886ef18c145" title=" " alt="" coords="984,875,1031,902"/>
<area shape="rect"  href="dispatch_8c.html#a274118ca9e580459d6e82f6d61a34d59" title=" " alt="" coords="967,824,1048,851"/>
<area shape="rect"  href="dispatch_8c.html#a45ffdf5a91d67bdc7a27b7fe7d39761a" title=" " alt="" coords="812,875,901,902"/>
<area shape="rect"  href="hashcat_8c.html#a9ec4f74d423ae0bd4aa6e960632b7086" title=" " alt="" coords="657,850,745,876"/>
<area shape="rect"  href="hashcat_8c.html#ad6cc36d03dcdad3413c794efecb3178a" title=" " alt="" coords="487,818,575,844"/>
<area shape="rect"  href="hashcat_8c.html#ac33e9695b713153c0fc7cce11696704b" title=" " alt="" coords="325,679,408,706"/>
<area shape="rect"  href="hashcat_8c.html#ac49fece3f82732fda9eb29766cc01168" title=" " alt="" coords="104,444,277,471"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,64,56,91"/>
<area shape="rect"  href="dispatch_8c.html#a9e518ec031f388304424fb2852075038" title=" " alt="" coords="795,824,919,851"/>
<area shape="rect"  href="hashcat_8c.html#a325cba22ef98f99a706d99c65989a2c2" title=" " alt="" coords="3093,507,3229,534"/>
<area shape="rect"  href="main__shared_8c.html#ae96d7808ccfe95bbec7a55e2ada91935" title=" " alt="" coords="2925,339,2975,366"/>
<area shape="rect"  href="terminal_8c.html#a30f3bb901b9e4c86fe78abb104c2f2fa" title=" " alt="" coords="2677,507,2807,534"/>
<area shape="rect"  href="terminal_8c.html#ab059eb0bceb2ee24e8f86c04f4354d16" title=" " alt="" coords="2855,558,3045,584"/>
<area shape="rect"  href="terminal_8c.html#a64a36e504f5e3a0b633b17dcfcf8366f" title=" " alt="" coords="2689,390,2795,416"/>
<area shape="rect"  href="terminal_8c.html#ae3a80a3f67aa1810c8d9e49911f490a6" title=" " alt="" coords="2869,441,3031,482"/>
<area shape="rect"  href="main_8c.html#af6ada2a7aa24abc385db81bf2967d967" title=" " alt="" coords="2479,434,2629,460"/>
<area shape="rect"  href="main_8c.html#a73c3170c7171851eb6e8f5a402599423" title=" " alt="" coords="1980,324,2032,351"/>
<area shape="rect"  href="hashcat_8c.html#ade4c61ccaafb16eae04c7d4b727942f3" title=" " alt="" coords="655,64,747,91"/>
<area shape="rect"  href="opencl_8c.html#ac62e3f353065d17d4caa46e165be51c2" title=" " alt="" coords="1505,419,1671,446"/>
<area shape="rect"  href="opencl_8c.html#af7aecf5b949a11bafa5f455504b5a8c2" title=" " alt="" coords="1745,318,1907,344"/>
<area shape="rect"  href="opencl_8c.html#a3797f3c2680a9e341e314ad0c84c9b16" title=" " alt="" coords="1728,419,1924,446"/>
<area shape="rect"  href="opencl_8c.html#a0c2e61014e4dab417caa193c598b6a23" title=" " alt="" coords="1547,267,1629,294"/>
<area shape="rect"  href="opencl_8c.html#a707b32d6170142181dc47bc668c03efa" title=" " alt="" coords="1505,520,1671,547"/>
<area shape="rect"  href="opencl_8c.html#aba298160a7f6951fdd26c1e2846e7f9b" title=" " alt="" coords="1720,368,1932,395"/>
<area shape="rect"  href="opencl_8c.html#ab47974684ac3076a5e2fe97db360f1f1" title=" " alt="" coords="1504,774,1672,800"/>
<area shape="rect"  href="opencl_8c.html#a6b505220d582c3a31d651cbe1d685484" title=" " alt="" coords="1763,166,1889,192"/>
<area shape="rect"  href="opencl_8c.html#a1a05fbe1529ac9bd5fcd1a0fed0f0fe7" title=" " alt="" coords="1740,115,1912,142"/>
<area shape="rect"  href="opencl_8c.html#ad598c213dd69579a45ca34bcac1ba552" title=" " alt="" coords="1760,216,1892,243"/>
<area shape="rect"  href="autotune_8c.html#a58022d7cc5d8126f33e8635c5ae62c2b" title=" " alt="" coords="1125,318,1197,344"/>
<area shape="rect"  href="opencl_8c.html#a6b485c94e6a1ed68eb8a230b59947aba" title=" " alt="" coords="1311,368,1418,395"/>
<area shape="rect"  href="opencl_8c.html#a3053f61b5154e477dca1ab3af40fc67f" title=" " alt="" coords="1531,318,1645,344"/>
<area shape="rect"  href="opencl_8c.html#a270475ec734ad9d206b4bfc7a8e7139b" title=" " alt="" coords="1297,470,1433,496"/>
<area shape="rect"  href="opencl_8c.html#a923e021b433067dd09b59522c754d4f4" title=" " alt="" coords="1311,723,1418,750"/>
<area shape="rect"  href="opencl_8c.html#aa3be407e53521e7f7f0d4de086ee7018" title=" " alt="" coords="1536,368,1640,395"/>
<area shape="rect"  href="autotune_8c.html#ad9235db23bece1366339da9a423d880a" title=" " alt="" coords="1333,166,1396,192"/>
<area shape="rect"  href="opencl_8c.html#ad74b845ad0c7ef8fb27e99d419a708a0" title=" " alt="" coords="1123,850,1198,876"/>
<area shape="rect"  href="opencl_8c.html#ade369d76f252c3c3a33a2ffed95c5824" title=" " alt="" coords="1315,520,1414,547"/>
<area shape="rect"  href="opencl_8c.html#a25858ed9c49bd2972bb375ec8190c2ba" title=" " alt="" coords="456,742,607,768"/>
<area shape="rect"  href="opencl_8c.html#a6e6cfbf2cffcded725be07e5f854ba2e" title=" " alt="" coords="1273,824,1456,851"/>
<area shape="rect"  href="opencl_8c.html#a36f294a1988a5ff960fa09c9c68de75d" title=" " alt="" coords="1285,876,1444,917"/>
<area shape="rect"  href="main_8c.html#a4e664697b793b6744c9849c1de53a051" title=" " alt="" coords="2288,317,2431,358"/>
<area shape="rect"  href="terminal_8c.html#a99e7c4c326b4b2acdbe60cedc81efea1" title=" " alt="" coords="2517,383,2591,410"/>
<area shape="rect"  href="terminal_8c.html#a5a70871e3050a17bffd2e15779d536d2" title=" " alt="" coords="2300,383,2419,410"/>
<area shape="rect"  href="main_8c.html#aa9cb60ea1fd75f8faf5ce16454f526ec" title=" " alt="" coords="2080,379,2240,406"/>
</map>
</div>

</div>
</div>
<a id="a596aa33c54c0b30afa011785439f0750"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a596aa33c54c0b30afa011785439f0750">&#9670;&nbsp;</a></span>outfile_and_hashfile()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int outfile_and_hashfile </td>
          <td>(</td>
          <td class="paramtype">hashcat_ctx_t *&#160;</td>
          <td class="paramname"><em>hashcat_ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="outfile_8c_source.html#l00448">448</a> of file <a class="el" href="outfile_8c_source.html">outfile.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;{</div><div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;  outfile_ctx_t        *outfile_ctx        = hashcat_ctx-&gt;outfile_ctx;</div><div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;  user_options_extra_t *user_options_extra = hashcat_ctx-&gt;user_options_extra;</div><div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;</div><div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;  <span class="keywordtype">char</span> *hashfile = user_options_extra-&gt;hc_hash;</div><div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;</div><div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;  <span class="keywordflow">if</span> (hashfile == NULL) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;</div><div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;  <span class="keywordtype">char</span> *outfile = outfile_ctx-&gt;filename;</div><div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;</div><div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;  <span class="keywordflow">if</span> (outfile == NULL) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;</div><div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;  hc_stat_t tmpstat_outfile;</div><div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;  hc_stat_t tmpstat_hashfile;</div><div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;</div><div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;  FILE *tmp_outfile_fp = fopen (outfile, <span class="stringliteral">&quot;r&quot;</span>);</div><div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;</div><div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;  <span class="keywordflow">if</span> (tmp_outfile_fp)</div><div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;  {</div><div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;    hc_fstat (fileno (tmp_outfile_fp), &amp;tmpstat_outfile);</div><div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;</div><div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;    fclose (tmp_outfile_fp);</div><div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;  }</div><div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;</div><div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;  FILE *tmp_hashfile_fp = fopen (hashfile, <span class="stringliteral">&quot;r&quot;</span>);</div><div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;</div><div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;  <span class="keywordflow">if</span> (tmp_hashfile_fp)</div><div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;  {</div><div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;    hc_fstat (fileno (tmp_hashfile_fp), &amp;tmpstat_hashfile);</div><div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;</div><div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;    fclose (tmp_hashfile_fp);</div><div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;  }</div><div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;</div><div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;  <span class="keywordflow">if</span> (tmp_outfile_fp)</div><div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;  {</div><div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;    tmpstat_outfile.st_mode     = 0;</div><div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;    tmpstat_outfile.st_nlink    = 0;</div><div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;    tmpstat_outfile.st_uid      = 0;</div><div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;    tmpstat_outfile.st_gid      = 0;</div><div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;    tmpstat_outfile.st_rdev     = 0;</div><div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;    tmpstat_outfile.st_atime    = 0;</div><div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;</div><div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;    tmpstat_hashfile.st_mode    = 0;</div><div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;    tmpstat_hashfile.st_nlink   = 0;</div><div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;    tmpstat_hashfile.st_uid     = 0;</div><div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;    tmpstat_hashfile.st_gid     = 0;</div><div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;    tmpstat_hashfile.st_rdev    = 0;</div><div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;    tmpstat_hashfile.st_atime   = 0;</div><div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;</div><div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;<span class="preprocessor">    #if defined (_POSIX)</span></div><div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;    tmpstat_outfile.st_blksize  = 0;</div><div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;    tmpstat_outfile.st_blocks   = 0;</div><div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;</div><div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;    tmpstat_hashfile.st_blksize = 0;</div><div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;    tmpstat_hashfile.st_blocks  = 0;</div><div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;<span class="preprocessor">    #endif</span></div><div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;</div><div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;    <span class="keywordflow">if</span> (memcmp (&amp;tmpstat_outfile, &amp;tmpstat_hashfile, <span class="keyword">sizeof</span> (hc_stat_t)) == 0)</div><div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;    {</div><div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;      <a class="code" href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5">event_log_error</a> (hashcat_ctx, <span class="stringliteral">&quot;Hashfile and Outfile are not allowed to point to the same file&quot;</span>);</div><div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;</div><div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;      <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;    }</div><div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;  }</div><div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;</div><div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;}</div><div class="ttc" id="event_8c_html_ab419d8d7e9b12e78980ed9f17bdd5ed5"><div class="ttname"><a href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5">event_log_error</a></div><div class="ttdeci">size_t event_log_error(hashcat_ctx_t *hashcat_ctx, const char *fmt,...)</div><div class="ttdef"><b>Definition:</b> <a href="event_8c_source.html#l00168">event.c:168</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="event_8c_source.html#l00168">event_log_error()</a>.</p>

<p class="reference">Referenced by <a class="el" href="hashcat_8c_source.html#l00833">hashcat_session_init()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="outfile_8c_a596aa33c54c0b30afa011785439f0750_cgraph.gif" border="0" usemap="#outfile_8c_a596aa33c54c0b30afa011785439f0750_cgraph" alt=""/></div>
<map name="outfile_8c_a596aa33c54c0b30afa011785439f0750_cgraph" id="outfile_8c_a596aa33c54c0b30afa011785439f0750_cgraph">
<area shape="rect"  title=" " alt="" coords="5,31,140,57"/>
<area shape="rect"  href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5" title=" " alt="" coords="188,31,297,57"/>
<area shape="rect"  href="event_8c.html#a6221c6caa1d2069ad1c3103f0b013ef7" title=" " alt="" coords="345,5,424,32"/>
<area shape="rect"  href="event_8c.html#ad5a30ac9dc4301540e19643500eb78e4" title=" " alt="" coords="347,56,423,83"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="outfile_8c_a596aa33c54c0b30afa011785439f0750_icgraph.gif" border="0" usemap="#outfile_8c_a596aa33c54c0b30afa011785439f0750_icgraph" alt=""/></div>
<map name="outfile_8c_a596aa33c54c0b30afa011785439f0750_icgraph" id="outfile_8c_a596aa33c54c0b30afa011785439f0750_icgraph">
<area shape="rect"  title=" " alt="" coords="296,5,431,32"/>
<area shape="rect"  href="hashcat_8c.html#a9f3f1b757bdc2a874b4bb0dc657bde1d" title=" " alt="" coords="104,5,248,32"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,5,56,32"/>
</map>
</div>

</div>
</div>
<a id="a6e4787d7dc982a7fc97f848cf12f6430"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e4787d7dc982a7fc97f848cf12f6430">&#9670;&nbsp;</a></span>outfile_destroy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void outfile_destroy </td>
          <td>(</td>
          <td class="paramtype">hashcat_ctx_t *&#160;</td>
          <td class="paramname"><em>hashcat_ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="outfile_8c_source.html#l00296">296</a> of file <a class="el" href="outfile_8c_source.html">outfile.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;{</div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;  outfile_ctx_t *outfile_ctx = hashcat_ctx-&gt;outfile_ctx;</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;  memset (outfile_ctx, 0, <span class="keyword">sizeof</span> (outfile_ctx_t));</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;}</div></div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="hashcat_8c_source.html#l01134">hashcat_session_destroy()</a>.</p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="outfile_8c_a6e4787d7dc982a7fc97f848cf12f6430_icgraph.gif" border="0" usemap="#outfile_8c_a6e4787d7dc982a7fc97f848cf12f6430_icgraph" alt=""/></div>
<map name="outfile_8c_a6e4787d7dc982a7fc97f848cf12f6430_icgraph" id="outfile_8c_a6e4787d7dc982a7fc97f848cf12f6430_icgraph">
<area shape="rect"  title=" " alt="" coords="323,5,429,32"/>
<area shape="rect"  href="hashcat_8c.html#aac7de5dfb85c0aa9bccebf9782855ffa" title=" " alt="" coords="104,5,275,32"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,5,56,32"/>
</map>
</div>

</div>
</div>
<a id="ab9cb34b09189a2f1b4a6e0e0c3519526"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab9cb34b09189a2f1b4a6e0e0c3519526">&#9670;&nbsp;</a></span>outfile_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int outfile_init </td>
          <td>(</td>
          <td class="paramtype">hashcat_ctx_t *&#160;</td>
          <td class="paramname"><em>hashcat_ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="outfile_8c_source.html#l00277">277</a> of file <a class="el" href="outfile_8c_source.html">outfile.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;{</div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;  outfile_ctx_t  *outfile_ctx  = hashcat_ctx-&gt;outfile_ctx;</div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;  user_options_t *user_options = hashcat_ctx-&gt;user_options;</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;  outfile_ctx-&gt;fp               = NULL;</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;  outfile_ctx-&gt;filename         = user_options-&gt;outfile;</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;  outfile_ctx-&gt;outfile_format   = user_options-&gt;outfile_format;</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;  outfile_ctx-&gt;outfile_autohex  = user_options-&gt;outfile_autohex;</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;  <span class="keyword">const</span> <span class="keywordtype">int</span> rc = <a class="code" href="outfile_8c.html#a2085d3798d2f36b34c3d3a87604364dc">outfile_write_open</a> (hashcat_ctx);</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;  <span class="keywordflow">if</span> (rc == -1) <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;  <a class="code" href="outfile_8c.html#a0ee7c764adf45c57931ed799c23f6c64">outfile_write_close</a> (hashcat_ctx);</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;}</div><div class="ttc" id="outfile_8c_html_a0ee7c764adf45c57931ed799c23f6c64"><div class="ttname"><a href="outfile_8c.html#a0ee7c764adf45c57931ed799c23f6c64">outfile_write_close</a></div><div class="ttdeci">void outfile_write_close(hashcat_ctx_t *hashcat_ctx)</div><div class="ttdef"><b>Definition:</b> <a href="outfile_8c_source.html#l00332">outfile.c:332</a></div></div>
<div class="ttc" id="outfile_8c_html_a2085d3798d2f36b34c3d3a87604364dc"><div class="ttname"><a href="outfile_8c.html#a2085d3798d2f36b34c3d3a87604364dc">outfile_write_open</a></div><div class="ttdeci">int outfile_write_open(hashcat_ctx_t *hashcat_ctx)</div><div class="ttdef"><b>Definition:</b> <a href="outfile_8c_source.html#l00303">outfile.c:303</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="outfile_8c_source.html#l00332">outfile_write_close()</a>, and <a class="el" href="outfile_8c_source.html#l00303">outfile_write_open()</a>.</p>

<p class="reference">Referenced by <a class="el" href="hashcat_8c_source.html#l00833">hashcat_session_init()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="outfile_8c_ab9cb34b09189a2f1b4a6e0e0c3519526_cgraph.gif" border="0" usemap="#outfile_8c_ab9cb34b09189a2f1b4a6e0e0c3519526_cgraph" alt=""/></div>
<map name="outfile_8c_ab9cb34b09189a2f1b4a6e0e0c3519526_cgraph" id="outfile_8c_ab9cb34b09189a2f1b4a6e0e0c3519526_cgraph">
<area shape="rect"  title=" " alt="" coords="5,31,85,57"/>
<area shape="rect"  href="outfile_8c.html#a0ee7c764adf45c57931ed799c23f6c64" title=" " alt="" coords="133,5,261,32"/>
<area shape="rect"  href="outfile_8c.html#a2085d3798d2f36b34c3d3a87604364dc" title=" " alt="" coords="135,56,260,83"/>
<area shape="rect"  href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5" title=" " alt="" coords="309,31,419,57"/>
<area shape="rect"  href="locking_8c.html#a29a00825c15274df14db9bf40c016d65" title=" " alt="" coords="329,81,399,108"/>
<area shape="rect"  href="event_8c.html#a6221c6caa1d2069ad1c3103f0b013ef7" title=" " alt="" coords="467,5,545,32"/>
<area shape="rect"  href="event_8c.html#ad5a30ac9dc4301540e19643500eb78e4" title=" " alt="" coords="468,56,544,83"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="outfile_8c_ab9cb34b09189a2f1b4a6e0e0c3519526_icgraph.gif" border="0" usemap="#outfile_8c_ab9cb34b09189a2f1b4a6e0e0c3519526_icgraph" alt=""/></div>
<map name="outfile_8c_ab9cb34b09189a2f1b4a6e0e0c3519526_icgraph" id="outfile_8c_ab9cb34b09189a2f1b4a6e0e0c3519526_icgraph">
<area shape="rect"  title=" " alt="" coords="296,5,376,32"/>
<area shape="rect"  href="hashcat_8c.html#a9f3f1b757bdc2a874b4bb0dc657bde1d" title=" " alt="" coords="104,5,248,32"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,5,56,32"/>
</map>
</div>

</div>
</div>
<a id="adaa59c594cc2e7c8c6ee05a6117c5313"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adaa59c594cc2e7c8c6ee05a6117c5313">&#9670;&nbsp;</a></span>outfile_write()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int outfile_write </td>
          <td>(</td>
          <td class="paramtype">hashcat_ctx_t *&#160;</td>
          <td class="paramname"><em>hashcat_ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>out_buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>plain_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const u32&#160;</td>
          <td class="paramname"><em>plain_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const u64&#160;</td>
          <td class="paramname"><em>crackpos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>username</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const u32&#160;</td>
          <td class="paramname"><em>user_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>tmp_buf</em>[HCBUFSIZ_LARGE]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="outfile_8c_source.html#l00341">341</a> of file <a class="el" href="outfile_8c_source.html">outfile.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;{</div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;  <span class="keyword">const</span> hashconfig_t   *hashconfig   = hashcat_ctx-&gt;hashconfig;</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;  <span class="keyword">const</span> outfile_ctx_t  *outfile_ctx  = hashcat_ctx-&gt;outfile_ctx;</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;  <span class="keyword">const</span> user_options_t *user_options = hashcat_ctx-&gt;user_options;</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;  <span class="keywordtype">int</span> tmp_len = 0;</div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;  <span class="keywordflow">if</span> (user_len &gt; 0)</div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;  {</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;    <span class="keywordflow">if</span> (username != NULL)</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;    {</div><div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;      memcpy (tmp_buf + tmp_len, username, user_len);</div><div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;</div><div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;      tmp_len += user_len;</div><div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;</div><div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;      <span class="keywordflow">if</span> (outfile_ctx-&gt;outfile_format &amp; (OUTFILE_FMT_HASH | OUTFILE_FMT_PLAIN | OUTFILE_FMT_HEXPLAIN | OUTFILE_FMT_CRACKPOS))</div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;      {</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;        tmp_buf[tmp_len] = hashconfig-&gt;separator;</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;        tmp_len += 1;</div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;      }</div><div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;    }</div><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;  }</div><div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;</div><div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;  <span class="keywordflow">if</span> (outfile_ctx-&gt;outfile_format &amp; OUTFILE_FMT_HASH)</div><div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;  {</div><div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">size_t</span> out_len = strlen (out_buf);</div><div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;</div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;    memcpy (tmp_buf + tmp_len, out_buf, out_len);</div><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;</div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;    tmp_len += out_len;</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;</div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;    <span class="keywordflow">if</span> (outfile_ctx-&gt;outfile_format &amp; (OUTFILE_FMT_PLAIN | OUTFILE_FMT_HEXPLAIN | OUTFILE_FMT_CRACKPOS))</div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;    {</div><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;      tmp_buf[tmp_len] = hashconfig-&gt;separator;</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;</div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;      tmp_len += 1;</div><div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;    }</div><div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;  }</div><div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;</div><div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;  <span class="keywordflow">if</span> (outfile_ctx-&gt;outfile_format &amp; OUTFILE_FMT_PLAIN)</div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;  {</div><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">bool</span> always_ascii = (hashconfig-&gt;hash_type &amp; OPTS_TYPE_PT_ALWAYS_ASCII) ? <span class="keyword">true</span> : <span class="keyword">false</span>;</div><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;</div><div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;    <span class="keywordflow">if</span> ((user_options-&gt;outfile_autohex == <span class="keyword">true</span>) &amp;&amp; (<a class="code" href="convert_8c.html#a43b00d6f60cf0f0b971029f9c1c208ca">need_hexify</a> (plain_ptr, plain_len, always_ascii) == <span class="keyword">true</span>))</div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;    {</div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;      tmp_buf[tmp_len++] = <span class="charliteral">&#39;$&#39;</span>;</div><div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;      tmp_buf[tmp_len++] = <span class="charliteral">&#39;H&#39;</span>;</div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;      tmp_buf[tmp_len++] = <span class="charliteral">&#39;E&#39;</span>;</div><div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;      tmp_buf[tmp_len++] = <span class="charliteral">&#39;X&#39;</span>;</div><div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;      tmp_buf[tmp_len++] = <span class="charliteral">&#39;[&#39;</span>;</div><div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;</div><div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;      <a class="code" href="convert_8c.html#a62591b9530b72d05ee1c66241e4f338a">exec_hexify</a> ((<span class="keyword">const</span> u8 *) plain_ptr, plain_len, (u8 *) tmp_buf + tmp_len);</div><div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;</div><div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;      tmp_len += plain_len * 2;</div><div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;</div><div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;      tmp_buf[tmp_len++] = <span class="charliteral">&#39;]&#39;</span>;</div><div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;    }</div><div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;    {</div><div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;      memcpy (tmp_buf + tmp_len, plain_ptr, plain_len);</div><div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;</div><div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;      tmp_len += plain_len;</div><div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;    }</div><div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;</div><div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;    <span class="keywordflow">if</span> (outfile_ctx-&gt;outfile_format &amp; (OUTFILE_FMT_HEXPLAIN | OUTFILE_FMT_CRACKPOS))</div><div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;    {</div><div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;      tmp_buf[tmp_len] = hashconfig-&gt;separator;</div><div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;</div><div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;      tmp_len += 1;</div><div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;    }</div><div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;  }</div><div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;</div><div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;  <span class="keywordflow">if</span> (outfile_ctx-&gt;outfile_format &amp; OUTFILE_FMT_HEXPLAIN)</div><div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;  {</div><div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;    <span class="keywordflow">for</span> (u32 i = 0; i &lt; plain_len; i++)</div><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;    {</div><div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;      <a class="code" href="convert_8c.html#a62591b9530b72d05ee1c66241e4f338a">exec_hexify</a> ((<span class="keyword">const</span> u8 *) plain_ptr, plain_len, (u8 *) tmp_buf + tmp_len);</div><div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;</div><div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;      tmp_len += 2;</div><div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;    }</div><div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;</div><div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;    <span class="keywordflow">if</span> (outfile_ctx-&gt;outfile_format &amp; (OUTFILE_FMT_CRACKPOS))</div><div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;    {</div><div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;      tmp_buf[tmp_len] = hashconfig-&gt;separator;</div><div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;</div><div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;      tmp_len += 1;</div><div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;    }</div><div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;  }</div><div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;</div><div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;  <span class="keywordflow">if</span> (outfile_ctx-&gt;outfile_format &amp; OUTFILE_FMT_CRACKPOS)</div><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;  {</div><div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;    sprintf (tmp_buf + tmp_len, <span class="stringliteral">&quot;%&quot;</span> PRIu64, crackpos);</div><div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;  }</div><div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;</div><div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;  tmp_buf[tmp_len] = 0;</div><div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;</div><div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;  <span class="keywordflow">if</span> (outfile_ctx-&gt;fp != NULL)</div><div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;  {</div><div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;    fwrite (tmp_buf, tmp_len,      1, outfile_ctx-&gt;fp);</div><div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;    fwrite (EOL,     strlen (EOL), 1, outfile_ctx-&gt;fp);</div><div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;  }</div><div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;</div><div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;  <span class="keywordflow">return</span> tmp_len;</div><div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;}</div><div class="ttc" id="convert_8c_html_a43b00d6f60cf0f0b971029f9c1c208ca"><div class="ttname"><a href="convert_8c.html#a43b00d6f60cf0f0b971029f9c1c208ca">need_hexify</a></div><div class="ttdeci">bool need_hexify(const u8 *buf, const int len, bool always_ascii)</div><div class="ttdef"><b>Definition:</b> <a href="convert_8c_source.html#l00078">convert.c:78</a></div></div>
<div class="ttc" id="convert_8c_html_a62591b9530b72d05ee1c66241e4f338a"><div class="ttname"><a href="convert_8c.html#a62591b9530b72d05ee1c66241e4f338a">exec_hexify</a></div><div class="ttdeci">void exec_hexify(const u8 *buf, const int len, u8 *out)</div><div class="ttdef"><b>Definition:</b> <a href="convert_8c_source.html#l00106">convert.c:106</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="convert_8c_source.html#l00106">exec_hexify()</a>, and <a class="el" href="convert_8c_source.html#l00078">need_hexify()</a>.</p>

<p class="reference">Referenced by <a class="el" href="hashes_8c_source.html#l00237">check_hash()</a>, <a class="el" href="potfile_8c_source.html#l00567">potfile_handle_left()</a>, and <a class="el" href="potfile_8c_source.html#l00503">potfile_handle_show()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="outfile_8c_adaa59c594cc2e7c8c6ee05a6117c5313_cgraph.gif" border="0" usemap="#outfile_8c_adaa59c594cc2e7c8c6ee05a6117c5313_cgraph" alt=""/></div>
<map name="outfile_8c_adaa59c594cc2e7c8c6ee05a6117c5313_cgraph" id="outfile_8c_adaa59c594cc2e7c8c6ee05a6117c5313_cgraph">
<area shape="rect"  title=" " alt="" coords="5,31,96,57"/>
<area shape="rect"  href="convert_8c.html#a62591b9530b72d05ee1c66241e4f338a" title=" " alt="" coords="144,5,235,32"/>
<area shape="rect"  href="convert_8c.html#a43b00d6f60cf0f0b971029f9c1c208ca" title=" " alt="" coords="144,56,235,83"/>
<area shape="rect"  href="convert_8c.html#a24581c9770964df6695ee679f1d95a8f" title=" " alt="" coords="283,31,388,57"/>
<area shape="rect"  href="convert_8c.html#a3fadd64188f3a6895cd82062ada514e6" title=" " alt="" coords="286,81,385,108"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="outfile_8c_adaa59c594cc2e7c8c6ee05a6117c5313_icgraph.gif" border="0" usemap="#outfile_8c_adaa59c594cc2e7c8c6ee05a6117c5313_icgraph" alt=""/></div>
<map name="outfile_8c_adaa59c594cc2e7c8c6ee05a6117c5313_icgraph" id="outfile_8c_adaa59c594cc2e7c8c6ee05a6117c5313_icgraph">
<area shape="rect"  title=" " alt="" coords="1571,157,1661,184"/>
<area shape="rect"  href="hashes_8c.html#a941bbcf804b81ac407d485859bf87999" title=" " alt="" coords="1431,107,1523,133"/>
<area shape="rect"  href="potfile_8c.html#aa340141d20febc4004a75982ea4927b2" title=" " alt="" coords="1257,157,1383,184"/>
<area shape="rect"  href="potfile_8c.html#ab54e1941ce1ee998c5b86e79d6e57bbc" title=" " alt="" coords="1071,208,1209,235"/>
<area shape="rect"  href="hashes_8c.html#a98055a12599ed1bd53da5c0694605f3d" title=" " alt="" coords="1265,107,1375,133"/>
<area shape="rect"  href="opencl_8c.html#af8bef12676549083a86b2986c456f72d" title=" " alt="" coords="1095,56,1185,83"/>
<area shape="rect"  href="weak__hash_8c.html#a410a6e1cce44e8f0c4cde8ec7d00ecd8" title=" " alt="" coords="592,107,721,133"/>
<area shape="rect"  href="dispatch_8c.html#a0502555fe69aef3e7b8c3886ef18c145" title=" " alt="" coords="959,5,1005,32"/>
<area shape="rect"  href="dispatch_8c.html#a274118ca9e580459d6e82f6d61a34d59" title=" " alt="" coords="941,56,1023,83"/>
<area shape="rect"  href="dispatch_8c.html#a45ffdf5a91d67bdc7a27b7fe7d39761a" title=" " alt="" coords="787,5,876,32"/>
<area shape="rect"  href="hashcat_8c.html#a9ec4f74d423ae0bd4aa6e960632b7086" title=" " alt="" coords="613,56,701,83"/>
<area shape="rect"  href="hashcat_8c.html#ad6cc36d03dcdad3413c794efecb3178a" title=" " alt="" coords="456,56,544,83"/>
<area shape="rect"  href="hashcat_8c.html#ac33e9695b713153c0fc7cce11696704b" title=" " alt="" coords="325,132,408,159"/>
<area shape="rect"  href="hashcat_8c.html#ac49fece3f82732fda9eb29766cc01168" title=" " alt="" coords="104,132,277,159"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,132,56,159"/>
<area shape="rect"  href="dispatch_8c.html#a9e518ec031f388304424fb2852075038" title=" " alt="" coords="769,56,893,83"/>
</map>
</div>

</div>
</div>
<a id="a0ee7c764adf45c57931ed799c23f6c64"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ee7c764adf45c57931ed799c23f6c64">&#9670;&nbsp;</a></span>outfile_write_close()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void outfile_write_close </td>
          <td>(</td>
          <td class="paramtype">hashcat_ctx_t *&#160;</td>
          <td class="paramname"><em>hashcat_ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="outfile_8c_source.html#l00332">332</a> of file <a class="el" href="outfile_8c_source.html">outfile.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;{</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;  outfile_ctx_t *outfile_ctx = hashcat_ctx-&gt;outfile_ctx;</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;  <span class="keywordflow">if</span> (outfile_ctx-&gt;fp == NULL) <span class="keywordflow">return</span>;</div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;</div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;  fclose (outfile_ctx-&gt;fp);</div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;}</div></div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="hashes_8c_source.html#l00237">check_hash()</a>, <a class="el" href="hashcat_8c_source.html#l00376">outer_loop()</a>, and <a class="el" href="outfile_8c_source.html#l00277">outfile_init()</a>.</p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="outfile_8c_a0ee7c764adf45c57931ed799c23f6c64_icgraph.gif" border="0" usemap="#outfile_8c_a0ee7c764adf45c57931ed799c23f6c64_icgraph" alt=""/></div>
<map name="outfile_8c_a0ee7c764adf45c57931ed799c23f6c64_icgraph" id="outfile_8c_a0ee7c764adf45c57931ed799c23f6c64_icgraph">
<area shape="rect"  title=" " alt="" coords="1564,157,1692,184"/>
<area shape="rect"  href="hashes_8c.html#a941bbcf804b81ac407d485859bf87999" title=" " alt="" coords="1424,107,1516,133"/>
<area shape="rect"  href="hashcat_8c.html#ac33e9695b713153c0fc7cce11696704b" title=" " alt="" coords="325,132,408,159"/>
<area shape="rect"  href="outfile_8c.html#ab9cb34b09189a2f1b4a6e0e0c3519526" title=" " alt="" coords="1281,208,1361,235"/>
<area shape="rect"  href="hashes_8c.html#a98055a12599ed1bd53da5c0694605f3d" title=" " alt="" coords="1265,107,1376,133"/>
<area shape="rect"  href="opencl_8c.html#af8bef12676549083a86b2986c456f72d" title=" " alt="" coords="1127,56,1217,83"/>
<area shape="rect"  href="weak__hash_8c.html#a410a6e1cce44e8f0c4cde8ec7d00ecd8" title=" " alt="" coords="456,107,585,133"/>
<area shape="rect"  href="dispatch_8c.html#a0502555fe69aef3e7b8c3886ef18c145" title=" " alt="" coords="1015,5,1061,32"/>
<area shape="rect"  href="dispatch_8c.html#a274118ca9e580459d6e82f6d61a34d59" title=" " alt="" coords="997,56,1079,83"/>
<area shape="rect"  href="dispatch_8c.html#a45ffdf5a91d67bdc7a27b7fe7d39761a" title=" " alt="" coords="843,5,932,32"/>
<area shape="rect"  href="hashcat_8c.html#a9ec4f74d423ae0bd4aa6e960632b7086" title=" " alt="" coords="661,56,749,83"/>
<area shape="rect"  href="hashcat_8c.html#ad6cc36d03dcdad3413c794efecb3178a" title=" " alt="" coords="477,56,565,83"/>
<area shape="rect"  href="hashcat_8c.html#ac49fece3f82732fda9eb29766cc01168" title=" " alt="" coords="104,157,277,184"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,183,56,209"/>
<area shape="rect"  href="dispatch_8c.html#a9e518ec031f388304424fb2852075038" title=" " alt="" coords="825,56,949,83"/>
<area shape="rect"  href="hashcat_8c.html#a9f3f1b757bdc2a874b4bb0dc657bde1d" title=" " alt="" coords="633,208,777,235"/>
</map>
</div>

</div>
</div>
<a id="a2085d3798d2f36b34c3d3a87604364dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2085d3798d2f36b34c3d3a87604364dc">&#9670;&nbsp;</a></span>outfile_write_open()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int outfile_write_open </td>
          <td>(</td>
          <td class="paramtype">hashcat_ctx_t *&#160;</td>
          <td class="paramname"><em>hashcat_ctx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="outfile_8c_source.html#l00303">303</a> of file <a class="el" href="outfile_8c_source.html">outfile.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;{</div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;  outfile_ctx_t *outfile_ctx = hashcat_ctx-&gt;outfile_ctx;</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;</div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;  <span class="keywordflow">if</span> (outfile_ctx-&gt;filename == NULL) <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;  FILE *fp = fopen (outfile_ctx-&gt;filename, <span class="stringliteral">&quot;ab&quot;</span>);</div><div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;</div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;  <span class="keywordflow">if</span> (fp == NULL)</div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;  {</div><div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;    <a class="code" href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5">event_log_error</a> (hashcat_ctx, <span class="stringliteral">&quot;%s: %s&quot;</span>, outfile_ctx-&gt;filename, strerror (errno));</div><div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;</div><div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;    <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;  }</div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;</div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="locking_8c.html#a29a00825c15274df14db9bf40c016d65">lock_file</a> (fp) == -1)</div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;  {</div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;    fclose (fp);</div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;</div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;    <a class="code" href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5">event_log_error</a> (hashcat_ctx, <span class="stringliteral">&quot;%s: %s&quot;</span>, outfile_ctx-&gt;filename, strerror (errno));</div><div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;</div><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;    <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;  }</div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;  outfile_ctx-&gt;fp = fp;</div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;</div><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;}</div><div class="ttc" id="locking_8c_html_a29a00825c15274df14db9bf40c016d65"><div class="ttname"><a href="locking_8c.html#a29a00825c15274df14db9bf40c016d65">lock_file</a></div><div class="ttdeci">int lock_file(MAYBE_UNUSED FILE *fp)</div><div class="ttdef"><b>Definition:</b> <a href="locking_8c_source.html#l00043">locking.c:43</a></div></div>
<div class="ttc" id="event_8c_html_ab419d8d7e9b12e78980ed9f17bdd5ed5"><div class="ttname"><a href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5">event_log_error</a></div><div class="ttdeci">size_t event_log_error(hashcat_ctx_t *hashcat_ctx, const char *fmt,...)</div><div class="ttdef"><b>Definition:</b> <a href="event_8c_source.html#l00168">event.c:168</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="event_8c_source.html#l00168">event_log_error()</a>, and <a class="el" href="locking_8c_source.html#l00043">lock_file()</a>.</p>

<p class="reference">Referenced by <a class="el" href="hashes_8c_source.html#l00237">check_hash()</a>, <a class="el" href="hashcat_8c_source.html#l00376">outer_loop()</a>, and <a class="el" href="outfile_8c_source.html#l00277">outfile_init()</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="outfile_8c_a2085d3798d2f36b34c3d3a87604364dc_cgraph.gif" border="0" usemap="#outfile_8c_a2085d3798d2f36b34c3d3a87604364dc_cgraph" alt=""/></div>
<map name="outfile_8c_a2085d3798d2f36b34c3d3a87604364dc_cgraph" id="outfile_8c_a2085d3798d2f36b34c3d3a87604364dc_cgraph">
<area shape="rect"  title=" " alt="" coords="5,56,131,83"/>
<area shape="rect"  href="event_8c.html#ab419d8d7e9b12e78980ed9f17bdd5ed5" title=" " alt="" coords="179,31,288,57"/>
<area shape="rect"  href="locking_8c.html#a29a00825c15274df14db9bf40c016d65" title=" " alt="" coords="199,81,268,108"/>
<area shape="rect"  href="event_8c.html#a6221c6caa1d2069ad1c3103f0b013ef7" title=" " alt="" coords="336,5,415,32"/>
<area shape="rect"  href="event_8c.html#ad5a30ac9dc4301540e19643500eb78e4" title=" " alt="" coords="337,56,413,83"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="outfile_8c_a2085d3798d2f36b34c3d3a87604364dc_icgraph.gif" border="0" usemap="#outfile_8c_a2085d3798d2f36b34c3d3a87604364dc_icgraph" alt=""/></div>
<map name="outfile_8c_a2085d3798d2f36b34c3d3a87604364dc_icgraph" id="outfile_8c_a2085d3798d2f36b34c3d3a87604364dc_icgraph">
<area shape="rect"  title=" " alt="" coords="1564,157,1689,184"/>
<area shape="rect"  href="hashes_8c.html#a941bbcf804b81ac407d485859bf87999" title=" " alt="" coords="1424,107,1516,133"/>
<area shape="rect"  href="hashcat_8c.html#ac33e9695b713153c0fc7cce11696704b" title=" " alt="" coords="325,132,408,159"/>
<area shape="rect"  href="outfile_8c.html#ab9cb34b09189a2f1b4a6e0e0c3519526" title=" " alt="" coords="1281,208,1361,235"/>
<area shape="rect"  href="hashes_8c.html#a98055a12599ed1bd53da5c0694605f3d" title=" " alt="" coords="1265,107,1376,133"/>
<area shape="rect"  href="opencl_8c.html#af8bef12676549083a86b2986c456f72d" title=" " alt="" coords="1127,56,1217,83"/>
<area shape="rect"  href="weak__hash_8c.html#a410a6e1cce44e8f0c4cde8ec7d00ecd8" title=" " alt="" coords="456,107,585,133"/>
<area shape="rect"  href="dispatch_8c.html#a0502555fe69aef3e7b8c3886ef18c145" title=" " alt="" coords="1015,5,1061,32"/>
<area shape="rect"  href="dispatch_8c.html#a274118ca9e580459d6e82f6d61a34d59" title=" " alt="" coords="997,56,1079,83"/>
<area shape="rect"  href="dispatch_8c.html#a45ffdf5a91d67bdc7a27b7fe7d39761a" title=" " alt="" coords="843,5,932,32"/>
<area shape="rect"  href="hashcat_8c.html#a9ec4f74d423ae0bd4aa6e960632b7086" title=" " alt="" coords="661,56,749,83"/>
<area shape="rect"  href="hashcat_8c.html#ad6cc36d03dcdad3413c794efecb3178a" title=" " alt="" coords="477,56,565,83"/>
<area shape="rect"  href="hashcat_8c.html#ac49fece3f82732fda9eb29766cc01168" title=" " alt="" coords="104,157,277,184"/>
<area shape="rect"  href="main_8c.html#a3c04138a5bfe5d72780bb7e82a18e627" title=" " alt="" coords="5,183,56,209"/>
<area shape="rect"  href="dispatch_8c.html#a9e518ec031f388304424fb2852075038" title=" " alt="" coords="825,56,949,83"/>
<area shape="rect"  href="hashcat_8c.html#a9f3f1b757bdc2a874b4bb0dc657bde1d" title=" " alt="" coords="633,208,777,235"/>
</map>
</div>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
